Software Development
Mapping Relationships Using Inheritance and Interfaces
Mapping Relationships in Java: Constructors & Polymorphism
Mapping Relationships in Java: Modeling Is-a Relationships Using Inheritance
Mapping Relationships in Java: Overriding Methods and Using Access Modifiers
Mapping Relationships in Java: Working with Interfaces & Class Loaders

Mapping Relationships in Java: Constructors & Polymorphism

Course Number:
it_jpmriidj_02_enus
Lesson Objectives

Mapping Relationships in Java: Constructors & Polymorphism

  • discover the key concepts covered in this course
  • examine how the default constructor in the base class is used in the derived class
  • use the super keyword to invoke a base class constructor from a derived class
  • invoke base class constructors correctly from derived classes
  • investigate nuances while defining derived class constructors
  • reuse code using the super() and this() constructor invocations
  • recall the characteristics of runtime polymorphism
  • invoke the right methods based on the runtime types of objects
  • outline how runtime polymorphism uses dynamic method dispatch
  • identify compile-time polymorphism with overloaded methods
  • overload methods with the same name and different number and types of input arguments
  • recall how Java identifies and invokes the right overloaded method based on parameter types
  • perform type promotions and coercions in custom class inheritance hierarchies
  • summarize the key concepts covered in this course

Overview/Description
Runtime polymorphism involves variables of a base class containing objects of a derived class. Java uses dynamic binding to ensure that such variables are a powerful mechanism for writing clean, extensible, and correct code. This course takes you through the use of these advanced Java processes and mechanisms. Examine how constructors work with inheritance, including the order of constructor invocation, the role of base and derived class constructors, and the super keyword. Learn about runtime polymorphism and how this process of determining which implementation of a method to invoke at runtime is known as dynamic method dispatch. As you advance, use compile-time polymorphism in Java through method overloading. By the end of this course, you'll have a solid grasp of constructor invocation and both runtime and compile-time polymorphism in Java.

Target

Prerequisites: none

Mapping Relationships in Java: Modeling Is-a Relationships Using Inheritance

Course Number:
it_jpmriidj_01_enus
Lesson Objectives

Mapping Relationships in Java: Modeling Is-a Relationships Using Inheritance

  • discover the key concepts covered in this course
  • outline how classes and inheritance can be used to model relationships
  • model is-a relationships using the inheritance hierarchy
  • recall how inheritance, polymorphism, and encapsulation are used in Java
  • identify the existence of the universal Object base class
  • examine methods inherited from the universal Object base class
  • implement custom and built-in classes derived from the Object base class
  • use the instanceof operator to identify types for objects
  • identify the compile-time and runtime types for objects
  • store objects of a derived class type in a variable of the base class type
  • set up an inheritance hierarchy using custom classes
  • identify the roles of the type of variable and type of object contained in the variable
  • perform up-casting and down-casting operations on objects
  • examine the inheritance of fields and methods in derived classes
  • summarize the key concepts covered in this course

Overview/Description
Java is an object-oriented programming language, meaning Java programs and frameworks are built on the pillars of inheritance and runtime polymorphism. Inheritance is used to model is-a relationships between classes; such relationships could include either behavior and state or just behavior alone. Use this course to appreciate how classes can be used to model an entity's state and behavior and inheritance to model is-a relationships between two classes. Create various objects of the universal base class Java.lang.Object and of other built-in and custom classes. Use the instanceof operator and the getClass method. Create an inheritance hierarchy out of custom classes. Then, practice using up-casting and down-casting on your objects to explore the relationship between variable types, object types, and inheritance. By the time you're finished, you'll clearly understand how inheritance is a powerful mechanism for code re-use and modeling is-a relationships in Java.

Target

Prerequisites: none

Mapping Relationships in Java: Overriding Methods and Using Access Modifiers

Course Number:
it_jpmriidj_03_enus
Lesson Objectives

Mapping Relationships in Java: Overriding Methods and Using Access Modifiers

  • discover the key concepts covered in this course
  • override methods to have different method implementations in derived classes
  • use the super keyword in overridden methods
  • identify method hiding when redefining static methods with the same name
  • use the final modifier to restrict a field from being initialized except in constructors
  • use the final modifier with methods to prevent overriding and with classes to prevent inheritance
  • list the characteristics of an abstract class
  • use abstract base classes in inheritance hierarchies
  • use the private access modifier to restrict access to fields and methods
  • contrast the restrictions offered by the public and private access modifiers
  • use factory methods to instantiate objects with private constructors
  • use the protected access modifier to restrict access to derived classes and classes in the same package
  • investigate the nuances of the protected access modifier
  • use the default modifier to restrict access to other classes in the same package
  • summarize the key concepts covered in this course

Overview/Description
Method overriding is a way in which a derived class can redefine - and override - the implementation of a method already defined in a base class. By overriding only those methods you absolutely need to and relying on the base class implementations for all others, you get a lot done with relatively little new code. Use this course to learn how to carry out this technique. Explore the somewhat surprising behavior of static methods and the phenomenon known as hiding. Use the final keyword to mark member variables, member functions, and even entire classes. Use the abstract keyword to indicate a given method is not implemented. Study the semantics of the access modifiers public, private, protected, and package-private. When you're done, you'll recognize how overriding differs from hiding, the semantics of access modifiers, and how abstract classes are used.

Target

Prerequisites: none

Mapping Relationships in Java: Working with Interfaces & Class Loaders

Course Number:
it_jpmriidj_04_enus
Lesson Objectives

Mapping Relationships in Java: Working with Interfaces & Class Loaders

  • discover the key concepts covered in this course
  • recall the characteristics of interfaces and interface methods
  • implement interface methods in class definitions
  • define fields in an interface and recall the modifiers applied to these fields
  • identify Java enforcements and checks for interface method implementations
  • specify default implementations for interface methods
  • define variables using interface types
  • recall the use case for class loaders and list the class loader hierarchy
  • access and use class loaders in Java
  • use class loaders to manually load classes
  • create a custom class loader with the right method implementations
  • use a custom class loader to load user-defined classes
  • summarize the key concepts covered in this course

Overview/Description
An interface is effectively a class in which all methods are public and abstract by default. Interfaces are ubiquitous in Java libraries and frameworks because they're such a great way of defining APIs. Use this course to learn how to get the most out of these abstract classes. Explore how a class can implement an interface and how Java supports multiple inheritance of interfaces, even though multiple inheritance of other base classes is disallowed. Move on to examine a case study that brings together the different aspects of inheritance used in this course and through which you'll implement your own class loader to load a Java .class file. By the end of this course, you'll be able to use interfaces to define and implement APIs as well as inheritance for advanced Java tasks, such as implementing your own custom class loader.

Target

Prerequisites: none

Close Chat Live